import OSS from "ali-oss";

const token = {
  accessKeyId: "LTAIl8X8cE1yB3QF",
  accessKeySecret: "JRhU8o9Gjur4XsXmKWjcORAmnaJWcw",
  region: "oss-cn-beijing", //
  bucket: "dealnetsfile", //
};

export const client = new OSS({
  accessKeyId: token.accessKeyId,
  accessKeySecret: token.accessKeySecret,
  region: token.region,
  bucket: token.bucket,
});

export const buildUrl = (keyName) => {
  return `https://dealnetsfile.oss-cn-beijing.aliyuncs.com/${keyName}`;
};
